package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum HarvestStatus implements HashID {

    HARVEST("0", "已收房"),
    UNHARVEST("1", "未收房"),
    ;


    private final String id;
    private final String desc ;

    private HarvestStatus(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    public static HarvestStatus get(String desc) {
        HarvestStatus[] harvestStatuses = values();
        for (HarvestStatus harvestStatus : harvestStatuses) {
            if (harvestStatus.getDesc().equals(desc)) {
                return harvestStatus;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
